home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 November
/
EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso
/
earcd
/
util
/
cli
/
nvtools.lha
/
GetNV.mod
< prev
next >
Wrap
Text File
|
1995-09-30
|
935b
|
59 lines
MODULE GetNV;
(*
$StackChk-
$RangeChk-
$NilChk-
$OvflChk-
$ReturnChk-
$CaseChk-
*)
IMPORT
y := SYSTEM,
(* Interfaces *)
d := Dos,
e := Exec,
nv := NonVolatile,
str := Strings;
CONST
template = "AN=APPNAME/A,IN=ITEMNAME/A,KR=KILLREQUESTER/S"
"\o$VER: GetNV.mod 1.0 (30.09.95)";
TYPE
Args = STRUCT (as :d.ArgsStruct)
appName :d.ArgString;
itemName :d.ArgString;
killReq :d.ArgBool;
END;
VAR
args :d.RDArgsPtr;
argv :Args;
data :nv.DataPtr;
BEGIN
IF nv.base=NIL THEN
d.PrintF("No nonvolatile.library!\n");
HALT(20);
END;
args := d.ReadArgs(template, argv, NIL);
IF args=NIL THEN
IF d.PrintFault(d.IoErr(), "GetNV") THEN END;
HALT(20);
END;
data := nv.GetCopyNV(argv.appName^, argv.itemName^, argv.killReq);
IF data#NIL THEN
d.PrintF("%s\n", data);
END;
CLOSE
d.FreeArgs(args);
nv.FreeNVData(data);
END GetNV.